﻿@model IEnumerable<ApplicationUser>

    @{
        ViewData["Title"] = "批量用户导入";
    }

    <form asp-action="ImportUsers" method="post" enctype="multipart/form-data">
        <div class="form-horizontal">
            <hr />
            <div class="form-group">
                <label class="col-md-2 control-label">文件</label>
                <div class="col-md-6">
                    <input type="file" name="excelfile" class="form-control" />
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-offset-2 col-md-10">
                    <input type="submit" value="导入" class="btn btn-default" />
                </div>
            </div>

        </div>
    </form>
<hr />
<div class="col-md-offset-2 col-md-6">
    <table class="table">
        <thead>
            <tr>
                <th>
                    名称
                </th>
                <th>
                    用户名
                </th>
            </tr>
        </thead>
        <tbody>
            @if (Model != null)
            {
                @foreach (var item in Model)
                {
                    <tr>
                        <td>
                            @Html.DisplayFor(modelItem => item.Name)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.UserName)
                        </td>
                    </tr>
                }
            }
        </tbody>
    </table>
    </div>
    @section Scripts {
        @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
    }
